﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TimViec.NguoiDung
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                LoadData();
            }
        }

        private void LoadData()
        {
            if(Session["NguoiDung"]!=null)
            {
                DAL.User user = BLL.NguoiDung.NguoiDung.Get_UserEmail(Session["NguoiDung"].ToString());
                lbUserName.Text = user.UserName;
                lbNgayDangKy.Text = user.NgayDangKy.ToString("dd/MM/yyyy");
            }
        }

        protected void cmd_Thoat_Click(object sender, EventArgs e)
        {
            Session["NguoiDung"] = null;
            Response.Redirect("/");
        }
    }
}